﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Himall.Entity.Config
{
   public class OrderComplaintInfoConfig : EntityTypeConfiguration<OrderComplaintInfo>
    {
        public OrderComplaintInfoConfig()
        {
            ToTable("Himall_OrderComplaints");
            Property(item => item.ShopName).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.UserName).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.ShopPhone).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.UserPhone).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.ComplaintReason).HasColumnType("varchar").HasMaxLength(1000);
            Property(item => item.SellerReply).HasColumnType("varchar").HasMaxLength(1000);
            HasRequired(x => x.OrderInfo).WithMany(x => x.OrderComplaintInfo).HasForeignKey(x => x.OrderId);
        }
    }
}
